package net.edu_soft.ec.common.util;

/**
 * @Description: 操作结果类
 * @author puing
 * @date 2019年12月6日
 */
public class ResultUtil {

	private int code;

	private Object value;

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	public ResultUtil() {
		super();
	}

	public ResultUtil(int code, Object value) {
		super();
		this.code = code;
		this.value = value;
	}

	public static ResultUtil succeed(Object value) {
		int code = 200;
		return new ResultUtil(code, value);
	}
	
	public static ResultUtil failed(int code, Object value) {
		
		return new ResultUtil(code, value);
	}
	
}
